const app = getApp()
Component({
  properties: {
    isShow: {
      type: Boolean,
      value: false,
    },
    bottomHeight: {
      type: Number,
      value: 32,
    },
  },
  data: {
    height: '',
    maskLayerShow: false
  },
  attached: function () {
    // 是否分享
    var _this = this;
    var isShare = app.globalData.system.isShare;
    _this.setData({
      isShare: isShare
    })
    
    var system = {};
    system.isShare = false;
    app.globalData.system = system;
  },
  methods: {
    _showMask(){
      var _this = this;
      _this.setData({
        maskLayerShow: !_this.data.maskLayerShow
      })
    },

    _travelToMy() {
      wx.switchTab({
        url: '/pages/ucenter/personcenter/personcenter'
      })
    },

    _travelToTestTicket() {
      wx.switchTab({
        url: '/pages/grade/grade'
      })
    },

    _travelToInterest() {
      wx.switchTab({
        url: '/pages/interest/interest'
      })
    },

    _travelToHome() {
      wx.switchTab({
        url: '/pages/home/home'
      })
    },

    _travelToTop() {
      wx.pageScrollTo({
        scrollTop: 0, //回到顶部
        duration: 500, //过程耗时
      })
      var _this = this;
      _this._showMask();
    },
  }
}) 